<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>{% block title %}首页{% endblock %}-microblog</title>
</head>
<body>
<div>
    Microblog:<a href="{{ url_for('index') }}">首页</a>
    {% if g.user.is_authenticated() %}
        <a href="{{ url_for('user', nickname=g.user.nickname) }}">个人主页</a>|
        <form style="display: inline" action="{{ url_for('search') }}" method="post" name="search">
            {{ g.search_form.hidden_tag() }}
            {{ g.search_form.search.label }}{{ g.search_form.search(size=20) }}
            <input type="submit" value="搜索"/>
        </form>
        <a href="{{ url_for('logout') }}">退出</a>
    {% else %}
        <a href="{{ url_for('login') }}">登录</a>|
        <a href="{{ url_for('signin') }}">注册</a>
    {% endif %}
</div>
<hr/>
{% block content %}{% endblock %}
</body>
</html>